<template>
	<view>
		<view class="fui-header fui-header-success">
			<view class="fui-header-left iconfont icon-fanhui" @click="result" ></view>
			<view class="title">取消订单发货</view>
		</view>
		<view class="status_bar"></view>
		<view class="fui-content navbar">		
			<view class="fui-title">选择包裹</view>
			<view class="fui-cell-group check-group">
				<view class="fui-cell">
					<view class="fui-cell-label">包裹1</view>
					<view class="fui-cell-info right">
						<switch  :color="color" style="transform:scale(0.7)" data-id="isnodiscount" :checked="isnodiscount" @change="switchChange" />
					</view>
				</view>
				<view class="fui-list goods-list"  v-for="(key, index) in list" :key="index">
					<view class="fui-list-media">
						<image  :src="list[index].src" class="round" onerror="this.src='../addons/ewei_shopv2/static/images/nopic100.jpg';">
					</view>
					<view class="fui-list-inner">
						<view class="title">{{list[index].title}}</view>
						<view class="subtitle">
							<text class="total half">规格:{{list[index].ge}} </text>
							<text class="total half">数量: {{list[index].num}}</text>
						</view>
					</view>
				</view>
			</view>		                    		
			<view class="fui-title">取消原因</view>
			<view class="fui-cell-group">
				<view class="fui-cell fui-cell-textarea">
					<view class="fui-cell-info">
						<textarea placeholder="取消发货原因" id="remarksend" v-model="text" />
					</view>
				</view>
			</view>		
		</view>
		<view class="fui-navbar params">
			<view class="nav-item btn btn-gray cancel-params" @click="result">取消</view>
			<view class="nav-item btn btn-success submit-params" @click="sub">确定</view>
		</view>
		<view class="bstatus_bar"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				//switch 颜色
				color:'#5cb85c',
				text:'',
				
				isnodiscount:false,
				//包裹数据
				list:[
					{
						'img':'http://qiniu.91zjj.cn/images/16/merch/203/l4HL6c4hPu6U5UbxM66vuxUO7HSxqH.jpg',
						'title':'试试一号',
						'ge':'1',
						'checked':'true',
						'num':'900',
					}
					
				],
			}
		},
		methods: {
			//返回上一页
			result(){
				uni.navigateTo({
				    url: './order'
				});
			},
			sub(){
				console.log(this.text)
			},
			switchChange(){
				this.isnodiscount=!this.isnodiscount
			}
		}
	}
</script>

<style>
.fui-list-inner .subtitle .total.half{
	width: 50;
}
.btn.btn-gray{
	background: #bbb;
	border-color: #bbb;
}
.btn.btn-success{
	background: #5cb85c;
	border-color: #5cb85c;
}
.fui-cell-info textarea{
	height: 100rpx;
}
.fui-header .iconfont{
	color: #fff;
	font-size: 24rpx;
	padding: 0 20rpx;
}
</style>
